/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package 解析.node.charproperty.支持补集;

import 解析.Matcher;
import 解析.node.charproperty.CharProperty;

/**
 *
 * @author yanxi
 */
public abstract class BmpCharProperty extends CharProperty支持补集 {

    @Override
    public boolean match(Matcher matcher, int i, CharSequence seq) {
        if (i < matcher.to) {
            return isSatisfiedBy(seq.charAt(i)) && next.match(matcher, i + 1, seq);
        } else {
            matcher.hitEnd = true;
            return false;
        }
    }
}
